Skip to content

Conversation

@feluxe
Copy link

@feluxe feluxe commented Jun 3, 2019

This adds 'basic' support for f-strings.

With this commit python-string-sql will be able to highlight the following code :

mytable = "table123"

query = f"""--sql
    SELECT * from {mytable};
"""

Cheers! :-)

PS: I just noticed that there is a little indentation mismatch. I think it was a mix of 4 space and 2 space before. My auto-formatter changed it to 2 space only. The only line that really changed is line 5.

@ptweir ptweir merged commit 387b0e5 into ptweir:master Jun 3, 2019
@ptweir
Copy link
Owner

ptweir commented Jun 3, 2019

Thanks for the pull request! In testing it I noticed that I think it would be best to all zero or more spaces before the "begin" and "end" patterns. I'll update that then bump the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants